//action生成器
import {
    COUNT_ADD,
    COUNT_SUB,
    GET_CNODE_LIST
} from '../actionType'
import { fetchCnode } from '@/api'
export function addCount(payload) {
    return {
        type: COUNT_ADD,
        payload
    }
}
export function subCount(payload) {
    return {
        type: COUNT_SUB,
        payload
    }
}
//功能
export function getList(payload) {
    //调接口
    return function(dispatch){
        fetchCnode(payload).then(res=>{
            // console.log(res);
            dispatch({
                type: GET_CNODE_LIST,
                payload:res
            })
        })
    }
}

